//
//  VC_FogetPasswordSMS.m
//  yjw-winner
//
//  Created by 隆霁 on 2018/9/20.
//  Copyright © 2018年 Shanghai decade financial information service co., LTD. All rights reserved.
//

#import "VC_FogetPasswordSMS.h"

@interface VC_FogetPasswordSMS ()
@property (weak, nonatomic) IBOutlet UILabel *phoneNumberLabel;
@property (weak, nonatomic) IBOutlet UIButton *sendSMSButton;

@end

@implementation VC_FogetPasswordSMS

- (void)viewDidLoad {
    [super viewDidLoad];

    self.sendSMSButton.layer.masksToBounds = YES;
    self.sendSMSButton.layer.cornerRadius = 4.0f;
    
    @try {
        NSString *t = [NSString stringWithFormat:@"点击发送短信按钮，将会发送一条验证码的短信至手机%@", [self dealwithPhoneNumber:_phoneNumber]];
        NSMutableAttributedString *mText = [[NSMutableAttributedString alloc] initWithString:t];
        [mText addAttributes:@{NSForegroundColorAttributeName:[UIColor redColor]} range:[t rangeOfString:[self dealwithPhoneNumber:_phoneNumber]]];
    }
    @catch(NSException *exception) {
        
    }
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (NSString *)dealwithPhoneNumber:(NSString *)phoneNumber {
    return [phoneNumber stringByReplacingOccurrencesOfString:[phoneNumber substringWithRange:NSMakeRange(3, 6)] withString:@"******"];
}

#pragma mark --mark EVENT

- (IBAction)sendSMSButtonClick:(UIButton *)sender {

}

@end
